<template>
	<div style="width: 100%">
		<el-progress
			:percentage="modelValue || 0"
			:type="type[FieldItem?.attrs.attr.curType]"
			:color="FieldItem?.attrs.attr.color"
			:show-text="FieldItem?.attrs.attr.showText"
			:stroke-width="FieldItem?.attrs.attr.strokeWidth"
		/>
	</div>
</template>

<script lang="ts" setup>
import { TablePageType, TabFieldType } from '/@/components/Linxyun/custom/DataStructs/commontype';

const props = withDefaults(
	defineProps<{
		pageInfo?: TablePageType;
		pageData?: Record<string, any>;
		inputData: Record<string, any>;
		globalData?: Record<string, any>;
		modelValue: string;
		FieldItem: TabFieldType | null;
	}>(),
	{
		modelValue: '',
		FieldItem: null,
	}
);
const { FieldItem, modelValue } = toRefs(props);
const type = reactive<{ [number: number]: string }>({
	0: 'line',
	1: 'circle',
	2: 'dashboard',
});
</script>

<style lang="scss" scoped></style>
